package com.schoolcloud.files.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 存储桶配置表
 * @TableName storage_bucket
 */
@TableName(value ="storage_bucket")
@Data
public class StorageBucket implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 存储桶名称
     */
    @TableField(value = "bucket_name")
    private String bucketName;

    /**
     * 存储类型（minio/oss/local）
     */
    @TableField(value = "storage_type")
    private String storageType;

    /**
     * 存储区域
     */
    @TableField(value = "region")
    private String region;

    /**
     * 访问密钥
     */
    @TableField(value = "access_key")
    private String accessKey;

    /**
     * 密钥
     */
    @TableField(value = "secret_key")
    private String secretKey;

    /**
     * 访问基础URL
     */
    @TableField(value = "base_url")
    private String baseUrl;

    /**
     * 状态：0-禁用 1-启用
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
